package com.island.gomallorder.controller;

import com.island.gomallorder.common.util.R;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RequestMapping(value = "/order")
@RestController
public class OrderController {

    /**
     * 1、使用拦截器验证登陆状态，没登陆的需要跳转gomall-auth服务登陆页面
     */
    @RequestMapping(value = "/getOrder")
    public R submitOrder(@RequestParam("ProductId")int ProductId){
        try{
            return R.ok();
        } catch (Exception e) {
            return R.error();
        }
    }

    @RequestMapping(value = "/listOrders")
    public Map<String, Object> listOrders(){
        Map<String, Object> res = new HashMap<>();
        return res;
    }

    @RequestMapping(value = "/detailOrder")
    public Map<String, Object> detailOrder(){
        Map<String, Object> res = new HashMap<>();
        return res;
    }

    @RequestMapping(value = "/updateOrder")
    public Map<String, Object> updateOrder(){
        Map<String, Object> res = new HashMap<>();
        return res;
    }

    @RequestMapping(value = "/deleteOrder")
    public Map<String, Object> deleteOrder(){
        Map<String, Object> res = new HashMap<>();
        return res;
    }

}
